//
//  UIBarButtonItem+extension.swift
//  HLwWeibo
//
//  Created by hqhxu on 16/3/7.
//  Copyright © 2016年 hqhxu. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    convenience init(imageName:String) {
        
        let button = UIButton()
        button.setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        button.setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        
        button.sizeToFit()
        
        self.init(customView:button)
    }
}

